# 添加 Java 8 镜像来源
FROM openjdk:8-jdk-alpine
MAINTAINER Snail

ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN mkdir -p /apps/heap
RUN mkdir -p /var/logs/snaillogs/

# 添加参数
ARG JAR_FILE
# 添加 Spring Boot 包
ADD target/${JAR_FILE} app.jar
# 执行启动命令
ENTRYPOINT ["java","-jar","/app.jar"]

RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.7/main/ > /etc/apk/repositories && apk add --update --no-cache ttf-dejavu fontconfig
